1. Field of the Invention
The present invention relates generally to a web screen creation method, program, and server displaying components such as an input field and a button dynamically on a web screen of a browser, and more particularly, to a web screen creation method, program, and server that enables a component to repeatedly display a value of content such as a list to be displayed on the web screen repeatedly in a dynamic manner.
2. Description of the Related Art
Up to now, JavaServer Pages (hereinafter referred to as “JSP”) is known as a technology to create a web screen dynamically. It is to be noted that Java and JavaServer are registered trademarks. In JSP, as shown in a JSP file 200 of FIG. 1, a screen is created by allowing a JSP extension tag 202 to coexist with a description of screen made by HTML. A part corresponding to the JSP extension tag 202 is replaced with fragments of HTML or a text at a server 204 to implement a dynamic screen. The mechanism of execution of the JSP of FIG. 1 will be explained below. The server 204 executes the JSP file 200 sequentially from the top. Upon the appearance of the JSP extension tag 202, a Java class corresponding to the JSP extension tag 202 is invoked. The invoked Java class outputs a character string. As shown in an output of the JSP execution result 206, the server 204 transmits the part corresponding to the JSP extension tag 202 after replacing the part with a character string 208 outputted by the Java class. Including reference to other objects, reading/writing of a file, access to database and the like, the invoked Java class can execute any basic processing capable of implementing with Java. More specifically, the JSP extension tag processing will be as described below. For the JSP extension tag, one Java class is provided per one type of the JSP extension tag. Upon the appearance of a start tag of the JSP extension tag, the corresponding Java class object is created; and a “tag start processing” of the object is executed. Upon the appearance of an end tag of the JSP extension tag, a “tag end processing” of the object created at the time of the start tag appearance is executed. The part corresponding to the start tag and the part corresponding to the end tag of the JSP extension tag are replaced with the character string outputted by the “tag start processing” and the “tag end processing” of the object; and the character string is transmitted to the browser. Meanwhile, JavaServer Faces (hereafter referred to as “JSF”) is known as a technology to create GUI (Graphical User Inter7face) on a web screen. Creation of stand-alone GUI application with JSF is within the range of the specification of JSF, but typically JSF is used to create a screen of web application. In JSF, GUI component such as an input field, a button is called a component. A screen is expressed in a component tree. To create a web screen by JSF it is necessary to define a component tree by some method. For this reason, in using JSF to create a web screen, a component tree is defined in JSP.
For example, a display screen 216 provided with an input field 218 and a button 220 of FIGS. 2A to 2C is expressed with a component tree 214 of FIG. 2B based on JSP file 212 of FIG. 2A. As in FIG. 2B, in creating a component tree with a structure such as a component tree 214 in that a component 224 having a child component 226, a child component 228, and a child component 230, in the inside (content) of a second line and a sixth line of the JSP extension tags corresponding to the component 224, in each of a third line, a fourth line, and a fifth line, the JSP extension tag corresponding to the component 226, the component 228, and the component 230 is described respectively. In addition, in the component tree 214, a component 222 made to be a root has the child component 224. The JSP extension tags of 224 are described in the inside of the JSP extension tags of the component 222 which are described in a first line and a seventh line. The mechanism of execution of JSF is explained next. Display of a web screen created by JSF is roughly divided into two phases and is executed at a phase for creating components and at a phase for outputting HTML.
(1) Component Tree Creation
The component tree is constructed by executing JSP. In a program corresponding to the JSP extension tag, an object of a component corresponding to the JSP tag is created rather than fragments of HTML and text are outputted. In case the JSP tags are surrounded by other JSP extension tags, setup is made in such a way that the object of the component becomes the child of the component corresponding to other JSP extension tags. The component tree is constructed by the above-mentioned processing.
(2) HTML Output
Following the completion of the component tree, the HTML output is executed. The HTML output is executed recursively having the root of the tree at the top as follows.    (A) Execute the output to precede. (Output the content needed to output ahead of the child component).    (B) Execute the output processing of all the child components.    (C) Execute the output to follow. (Output the content needed to output after the child component).
With the component tree 214 in FIG. 3A, the HTML output will be explained. The output processing is executed in turn from step S1 to Step S7. Step S1 and Step S2 are the output to precede; Step S6 and Step S7 are the output to follow. Since the outputText component 226 does not have the child component, the output to precede and the output to follow are executed in succession. Therefore, the output to precede and the output to follow are shown in step 3 in one output. The inputText component 238 and the commandButton component 230 of Step S4 and Step S5 are also the same.
FIG. 3B is an HTML output 232 from Step S2 through Step S6, and the display screen 216 is displayed in FIG. 3C. As described above, JSF offered as standard specification connects the screen components of web application to the components. The relationships between the components are managed by the server side as the component tree. At this time, JSP being standard implementation of JSF, the hierarchical structure of JSP extension tags is mapped in JSP as a component tree. However, the component tree is created only for the JSP extension tags created on the JSF specification. Other literal character strings, for example, tags such as <BR> and <HR> are not included in the component of the tree. The literal character strings refer to the portion not belong to the JSP extension tags.
FIGS. 4A and 4B show a component made to display content repeatedly on a screen. A component such as shown in this drawing will be examined now. A JSP file 234 in FIG. 17A has a repeat portion 236 ranging from a third line to a sixth line. “uji:list” is one of the components of the repeat portion 236, SHAPE ¥* MERGEFORMAT. The “uji:list” controls the repetition. Namely, the intention is to create a component made to output and to display list <uji: value> from a front item <li> to a back item </li> repeatedly. However, the front item <li> and the back item </li> becoming the literal portion in the character strings to be repeated do not exist as components in a UI component tree 240 in FIG. 4B. Drawing is, therefore, cannot be done.
In JSF, therefore, a need to describe the literal portion of the character strings to be repeated in a fourth line in FIGS. 4A and 4B as the JSF extension tags exists. The literal portion is described as the JSF extension tags ranging from the fourth line to the sixth line in FIG. 5A. In this case, for the portion to be repeated, a component 256, a component 248, and a component 258 are constructed as in FIG. 5B; and for example a component made to display “value 1,” “value 2,” and “value 3” repeatedly as in FIG. 5B can be created.
For the literal portion of the character strings to create a component made to display content repeatedly in the conventional method, when JSF extension tags on JSP file are used, the volume of description increases. The readability drop is also a problem in JSP. Up to now, HTML and JSP have been used to create a web screen. In using HTML and JSP, text as literal character strings displayed fixedly on a screen and HTML tags are to be described in JSP file or in HTML file as they are. However, the need to describe JSP extension tags exists for the literal character strings contained in a component made to display content repeatedly when JSF is used. This need raises the volume of description. JSP extension tags are added to the component made to display content repeatedly. As a result, readability is decreased in comparison with the case of reading the description made by the conventional HTML or JSP. JSF is especially hard to write as well to read for users who previously used HTML or JSP and moved to JSF. The reason is that the new users need to describe literal character strings by rules different from the conventional rules.